package com.liyanxi.shopcardbyspringcloud.controller;


import com.liyanxi.shopcardbyspringcloud.pojo.po.GoodPO;
import com.liyanxi.shopcardbyspringcloud.service.IGoodService;
import com.liyanxi.shopcardbyspringcloud.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liyanxi
 * @since 2021-08-08
 */
@RestController
@RequestMapping("/good")
public class GoodController {

    @Autowired
    IGoodService iGoodService;

    @GetMapping("/getGood")
    public Result getGood(){
        List<GoodPO> list = iGoodService.list();
        return Result.ok(list);
    }
}
